#include <iostream>
#include <cmath>
using namespace std;
int main()
{
  int A, B;
  cin >> A >> B;
  cout << ((A >= 0) && (B < -2));
  return 0;
}
